Optimal. Leaf size=253 \[ \frac {a b^2 B d^3-a^2 b C d^3+a^3 d^3 D-b^3 \left (2 c^2 C d-2 B c d^2+3 A d^3-2 c^3 D\right )}{b^3 d^2 (b c-a d)^2 \sqrt {c+d x}}-\frac {A-\frac {a \left (b^2 B-a b C+a^2 D\right )}{b^3}}{(b c-a d) (a+b x) \sqrt {c+d x}}+\frac {2 D \sqrt {c+d x}}{b^2 d^2}-\frac {\left (b^3 (2 B c-3 A d)-a b^2 (4 c C-B d)-3 a^3 d D+a^2 b (C d+6 c D)\right ) \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {c+d x}}{\sqrt {b c-a d}}\right )}{b^{5/2} (b c-a d)^{5/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.40, antiderivative size = 253, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {1635, 911,
1275, 214} \begin {gather*} -\frac {A-\frac {a \left (a^2 D-a b C+b^2 B\right )}{b^3}}{(a+b x) \sqrt {c+d x} (b c-a d)}+\frac {a^3 d^3 D-a^2 b C d^3+a b^2 B d^3-\left (b^3 \left (3 A d^3-2 B c d^2-2 c^3 D+2 c^2 C d\right )\right )}{b^3 d^2 \sqrt {c+d x} (b c-a d)^2}-\frac {\tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {c+d x}}{\sqrt {b c-a d}}\right ) \left (-3 a^3 d D+a^2 b (6 c D+C d)-a b^2 (4 c C-B d)+b^3 (2 B c-3 A d)\right )}{b^{5/2} (b c-a d)^{5/2}}+\frac {2 D \sqrt {c+d x}}{b^2 d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 911
Rule 1275
Rule 1635
Rubi steps
\begin {align*} \int \frac {A+B x+C x^2+D x^3}{(a+b x)^2 (c+d x)^{3/2}} \, dx &=-\frac {A-\frac {a \left (b^2 B-a b C+a^2 D\right )}{b^3}}{(b c-a d) (a+b x) \sqrt {c+d x}}+\frac {\int \frac {-\frac {b^3 (2 B c-3 A d)-a b^2 (2 c C-B d)+a^3 d D-a^2 b (C d-2 c D)}{2 b^3}-\frac {(b c-a d) (b C-a D) x}{b^2}-\left (c-\frac {a d}{b}\right ) D x^2}{(a+b x) (c+d x)^{3/2}} \, dx}{-b c+a d}\\ &=-\frac {A-\frac {a \left (b^2 B-a b C+a^2 D\right )}{b^3}}{(b c-a d) (a+b x) \sqrt {c+d x}}-\frac {2 \text {Subst}\left (\int \frac {\frac {-c^2 \left (c-\frac {a d}{b}\right ) D+\frac {c d (b c-a d) (b C-a D)}{b^2}-\frac {d^2 \left (b^3 (2 B c-3 A d)-a b^2 (2 c C-B d)+a^3 d D-a^2 b (C d-2 c D)\right )}{2 b^3}}{d^2}-\frac {\left (-2 c \left (c-\frac {a d}{b}\right ) D+\frac {d (b c-a d) (b C-a D)}{b^2}\right ) x^2}{d^2}-\frac {\left (c-\frac {a d}{b}\right ) D x^4}{d^2}}{x^2 \left (\frac {-b c+a d}{d}+\frac {b x^2}{d}\right )} \, dx,x,\sqrt {c+d x}\right )}{d (b c-a d)}\\ &=-\frac {A-\frac {a \left (b^2 B-a b C+a^2 D\right )}{b^3}}{(b c-a d) (a+b x) \sqrt {c+d x}}-\frac {2 \text {Subst}\left (\int \left (-\frac {(b c-a d) D}{b^2 d}+\frac {a b^2 B d^3-a^2 b C d^3+a^3 d^3 D-b^3 \left (2 c^2 C d-2 B c d^2+3 A d^3-2 c^3 D\right )}{2 b^3 d (b c-a d) x^2}+\frac {d \left (b^3 (2 B c-3 A d)-a b^2 (4 c C-B d)-3 a^3 d D+a^2 b (C d+6 c D)\right )}{2 b^2 (b c-a d) \left (b c-a d-b x^2\right )}\right ) \, dx,x,\sqrt {c+d x}\right )}{d (b c-a d)}\\ &=\frac {a b^2 B d^3-a^2 b C d^3+a^3 d^3 D-b^3 \left (2 c^2 C d-2 B c d^2+3 A d^3-2 c^3 D\right )}{b^3 d^2 (b c-a d)^2 \sqrt {c+d x}}-\frac {A-\frac {a \left (b^2 B-a b C+a^2 D\right )}{b^3}}{(b c-a d) (a+b x) \sqrt {c+d x}}+\frac {2 D \sqrt {c+d x}}{b^2 d^2}-\frac {\left (b^3 (2 B c-3 A d)-a b^2 (4 c C-B d)-3 a^3 d D+a^2 b (C d+6 c D)\right ) \text {Subst}\left (\int \frac {1}{b c-a d-b x^2} \, dx,x,\sqrt {c+d x}\right )}{b^2 (b c-a d)^2}\\ &=\frac {a b^2 B d^3-a^2 b C d^3+a^3 d^3 D-b^3 \left (2 c^2 C d-2 B c d^2+3 A d^3-2 c^3 D\right )}{b^3 d^2 (b c-a d)^2 \sqrt {c+d x}}-\frac {A-\frac {a \left (b^2 B-a b C+a^2 D\right )}{b^3}}{(b c-a d) (a+b x) \sqrt {c+d x}}+\frac {2 D \sqrt {c+d x}}{b^2 d^2}-\frac {\left (b^3 (2 B c-3 A d)-a b^2 (4 c C-B d)-3 a^3 d D+a^2 b (C d+6 c D)\right ) \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {c+d x}}{\sqrt {b c-a d}}\right )}{b^{5/2} (b c-a d)^{5/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.81, size = 259, normalized size = 1.02 \begin {gather*} \frac {3 a^3 d^2 D (c+d x)+a^2 b d (c+d x) (-C d-4 c D+2 d D x)+b^3 \left (-A d^2 (c+3 d x)+2 c x \left (-c C d+B d^2+2 c^2 D+c d D x\right )\right )+a b^2 \left (4 c^3 D+d^3 (-2 A+B x)-2 c^2 d (C+D x)+c d^2 \left (3 B-4 D x^2\right )\right )}{b^2 d^2 (b c-a d)^2 (a+b x) \sqrt {c+d x}}+\frac {\left (b^3 (2 B c-3 A d)+a b^2 (-4 c C+B d)-3 a^3 d D+a^2 b (C d+6 c D)\right ) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {c+d x}}{\sqrt {-b c+a d}}\right )}{b^{5/2} (-b c+a d)^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 228, normalized size = 0.90
method | result | size |
derivativedivides | \(\frac {\frac {2 D \sqrt {d x +c}}{b^{2}}-\frac {2 \left (A \,d^{3}-B c \,d^{2}+C \,c^{2} d -D c^{3}\right )}{\left (a d -b c \right )^{2} \sqrt {d x +c}}-\frac {2 d^{2} \left (\frac {\left (\frac {1}{2} A \,b^{3} d -\frac {1}{2} B a \,b^{2} d +\frac {1}{2} C \,a^{2} b d -\frac {1}{2} a^{3} d D\right ) \sqrt {d x +c}}{b \left (d x +c \right )+a d -b c}+\frac {\left (3 A \,b^{3} d -B a \,b^{2} d -2 B \,b^{3} c -C \,a^{2} b d +4 C a \,b^{2} c +3 a^{3} d D-6 D a^{2} b c \right ) \arctan \left (\frac {b \sqrt {d x +c}}{\sqrt {\left (a d -b c \right ) b}}\right )}{2 \sqrt {\left (a d -b c \right ) b}}\right )}{\left (a d -b c \right )^{2} b^{2}}}{d^{2}}\) | \(228\) |
default | \(\frac {\frac {2 D \sqrt {d x +c}}{b^{2}}-\frac {2 \left (A \,d^{3}-B c \,d^{2}+C \,c^{2} d -D c^{3}\right )}{\left (a d -b c \right )^{2} \sqrt {d x +c}}-\frac {2 d^{2} \left (\frac {\left (\frac {1}{2} A \,b^{3} d -\frac {1}{2} B a \,b^{2} d +\frac {1}{2} C \,a^{2} b d -\frac {1}{2} a^{3} d D\right ) \sqrt {d x +c}}{b \left (d x +c \right )+a d -b c}+\frac {\left (3 A \,b^{3} d -B a \,b^{2} d -2 B \,b^{3} c -C \,a^{2} b d +4 C a \,b^{2} c +3 a^{3} d D-6 D a^{2} b c \right ) \arctan \left (\frac {b \sqrt {d x +c}}{\sqrt {\left (a d -b c \right ) b}}\right )}{2 \sqrt {\left (a d -b c \right ) b}}\right )}{\left (a d -b c \right )^{2} b^{2}}}{d^{2}}\) | \(228\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 785 vs.
\(2 (236) = 472\).
time = 0.94, size = 1583, normalized size = 6.26 \begin {gather*} \left [\frac {{\left ({\left (3 \, D a^{4} c - {\left (C a^{3} b + B a^{2} b^{2} - 3 \, A a b^{3}\right )} c\right )} d^{3} - 2 \, {\left (3 \, D a^{3} b c^{2} - {\left (2 \, C a^{2} b^{2} - B a b^{3}\right )} c^{2}\right )} d^{2} + {\left ({\left (3 \, D a^{3} b - C a^{2} b^{2} - B a b^{3} + 3 \, A b^{4}\right )} d^{4} - 2 \, {\left (3 \, D a^{2} b^{2} c - {\left (2 \, C a b^{3} - B b^{4}\right )} c\right )} d^{3}\right )} x^{2} + {\left ({\left (3 \, D a^{4} - C a^{3} b - B a^{2} b^{2} + 3 \, A a b^{3}\right )} d^{4} - 3 \, {\left (D a^{3} b c - {\left (C a^{2} b^{2} - B a b^{3} + A b^{4}\right )} c\right )} d^{3} - 2 \, {\left (3 \, D a^{2} b^{2} c^{2} - {\left (2 \, C a b^{3} - B b^{4}\right )} c^{2}\right )} d^{2}\right )} x\right )} \sqrt {b^{2} c - a b d} \log \left (\frac {b d x + 2 \, b c - a d + 2 \, \sqrt {b^{2} c - a b d} \sqrt {d x + c}}{b x + a}\right ) + 2 \, {\left (4 \, D a b^{4} c^{4} + 2 \, A a^{2} b^{3} d^{4} - {\left (3 \, D a^{4} b c - {\left (C a^{3} b^{2} - 3 \, B a^{2} b^{3} - A a b^{4}\right )} c\right )} d^{3} + {\left (7 \, D a^{3} b^{2} c^{2} + {\left (C a^{2} b^{3} + 3 \, B a b^{4} - A b^{5}\right )} c^{2}\right )} d^{2} + 2 \, {\left (D b^{5} c^{3} d - 3 \, D a b^{4} c^{2} d^{2} + 3 \, D a^{2} b^{3} c d^{3} - D a^{3} b^{2} d^{4}\right )} x^{2} - 2 \, {\left (4 \, D a^{2} b^{3} c^{3} + C a b^{4} c^{3}\right )} d + {\left (4 \, D b^{5} c^{4} + 2 \, {\left (C a b^{4} + B b^{5}\right )} c^{2} d^{2} - {\left (3 \, D a^{4} b - C a^{3} b^{2} + B a^{2} b^{3} - 3 \, A a b^{4}\right )} d^{4} + {\left (5 \, D a^{3} b^{2} c - {\left (C a^{2} b^{3} + B a b^{4} + 3 \, A b^{5}\right )} c\right )} d^{3} - 2 \, {\left (3 \, D a b^{4} c^{3} + C b^{5} c^{3}\right )} d\right )} x\right )} \sqrt {d x + c}}{2 \, {\left (a b^{6} c^{4} d^{2} - 3 \, a^{2} b^{5} c^{3} d^{3} + 3 \, a^{3} b^{4} c^{2} d^{4} - a^{4} b^{3} c d^{5} + {\left (b^{7} c^{3} d^{3} - 3 \, a b^{6} c^{2} d^{4} + 3 \, a^{2} b^{5} c d^{5} - a^{3} b^{4} d^{6}\right )} x^{2} + {\left (b^{7} c^{4} d^{2} - 2 \, a b^{6} c^{3} d^{3} + 2 \, a^{3} b^{4} c d^{5} - a^{4} b^{3} d^{6}\right )} x\right )}}, -\frac {{\left ({\left (3 \, D a^{4} c - {\left (C a^{3} b + B a^{2} b^{2} - 3 \, A a b^{3}\right )} c\right )} d^{3} - 2 \, {\left (3 \, D a^{3} b c^{2} - {\left (2 \, C a^{2} b^{2} - B a b^{3}\right )} c^{2}\right )} d^{2} + {\left ({\left (3 \, D a^{3} b - C a^{2} b^{2} - B a b^{3} + 3 \, A b^{4}\right )} d^{4} - 2 \, {\left (3 \, D a^{2} b^{2} c - {\left (2 \, C a b^{3} - B b^{4}\right )} c\right )} d^{3}\right )} x^{2} + {\left ({\left (3 \, D a^{4} - C a^{3} b - B a^{2} b^{2} + 3 \, A a b^{3}\right )} d^{4} - 3 \, {\left (D a^{3} b c - {\left (C a^{2} b^{2} - B a b^{3} + A b^{4}\right )} c\right )} d^{3} - 2 \, {\left (3 \, D a^{2} b^{2} c^{2} - {\left (2 \, C a b^{3} - B b^{4}\right )} c^{2}\right )} d^{2}\right )} x\right )} \sqrt {-b^{2} c + a b d} \arctan \left (\frac {\sqrt {-b^{2} c + a b d} \sqrt {d x + c}}{b d x + b c}\right ) - {\left (4 \, D a b^{4} c^{4} + 2 \, A a^{2} b^{3} d^{4} - {\left (3 \, D a^{4} b c - {\left (C a^{3} b^{2} - 3 \, B a^{2} b^{3} - A a b^{4}\right )} c\right )} d^{3} + {\left (7 \, D a^{3} b^{2} c^{2} + {\left (C a^{2} b^{3} + 3 \, B a b^{4} - A b^{5}\right )} c^{2}\right )} d^{2} + 2 \, {\left (D b^{5} c^{3} d - 3 \, D a b^{4} c^{2} d^{2} + 3 \, D a^{2} b^{3} c d^{3} - D a^{3} b^{2} d^{4}\right )} x^{2} - 2 \, {\left (4 \, D a^{2} b^{3} c^{3} + C a b^{4} c^{3}\right )} d + {\left (4 \, D b^{5} c^{4} + 2 \, {\left (C a b^{4} + B b^{5}\right )} c^{2} d^{2} - {\left (3 \, D a^{4} b - C a^{3} b^{2} + B a^{2} b^{3} - 3 \, A a b^{4}\right )} d^{4} + {\left (5 \, D a^{3} b^{2} c - {\left (C a^{2} b^{3} + B a b^{4} + 3 \, A b^{5}\right )} c\right )} d^{3} - 2 \, {\left (3 \, D a b^{4} c^{3} + C b^{5} c^{3}\right )} d\right )} x\right )} \sqrt {d x + c}}{a b^{6} c^{4} d^{2} - 3 \, a^{2} b^{5} c^{3} d^{3} + 3 \, a^{3} b^{4} c^{2} d^{4} - a^{4} b^{3} c d^{5} + {\left (b^{7} c^{3} d^{3} - 3 \, a b^{6} c^{2} d^{4} + 3 \, a^{2} b^{5} c d^{5} - a^{3} b^{4} d^{6}\right )} x^{2} + {\left (b^{7} c^{4} d^{2} - 2 \, a b^{6} c^{3} d^{3} + 2 \, a^{3} b^{4} c d^{5} - a^{4} b^{3} d^{6}\right )} x}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.61, size = 388, normalized size = 1.53 \begin {gather*} \frac {{\left (6 \, D a^{2} b c - 4 \, C a b^{2} c + 2 \, B b^{3} c - 3 \, D a^{3} d + C a^{2} b d + B a b^{2} d - 3 \, A b^{3} d\right )} \arctan \left (\frac {\sqrt {d x + c} b}{\sqrt {-b^{2} c + a b d}}\right )}{{\left (b^{4} c^{2} - 2 \, a b^{3} c d + a^{2} b^{2} d^{2}\right )} \sqrt {-b^{2} c + a b d}} + \frac {2 \, {\left (d x + c\right )} D b^{3} c^{3} - 2 \, D b^{3} c^{4} - 2 \, {\left (d x + c\right )} C b^{3} c^{2} d + 2 \, D a b^{2} c^{3} d + 2 \, C b^{3} c^{3} d + 2 \, {\left (d x + c\right )} B b^{3} c d^{2} - 2 \, C a b^{2} c^{2} d^{2} - 2 \, B b^{3} c^{2} d^{2} + {\left (d x + c\right )} D a^{3} d^{3} - {\left (d x + c\right )} C a^{2} b d^{3} + {\left (d x + c\right )} B a b^{2} d^{3} - 3 \, {\left (d x + c\right )} A b^{3} d^{3} + 2 \, B a b^{2} c d^{3} + 2 \, A b^{3} c d^{3} - 2 \, A a b^{2} d^{4}}{{\left (b^{4} c^{2} d^{2} - 2 \, a b^{3} c d^{3} + a^{2} b^{2} d^{4}\right )} {\left ({\left (d x + c\right )}^{\frac {3}{2}} b - \sqrt {d x + c} b c + \sqrt {d x + c} a d\right )}} + \frac {2 \, \sqrt {d x + c} D}{b^{2} d^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {A+B\,x+C\,x^2+x^3\,D}{{\left (a+b\,x\right )}^2\,{\left (c+d\,x\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________